#lang r5rs
(define (make-point x-p y-p)
  (cons (x-p y-p)))
(define (make-seg from to)
  (cons (from to)))
(define (start-seg seg)
  (car seg))
(define (end-seg seg)
  (cdr seg))
(define (x-point point)
  (car point))
(define (y-point point)
  (cdr point))
(define (print-point point)
  (newline)
  (display "(")
  (display (x-point point))
  (display ",")
  (display (y-point point))
  (display ")"))
(define (mid-point seg)
  (cons (/ (+ (x-point (start-seg seg)) (x-point (end-seg seg))) 2)
        (/ (+ (y-point (start-seg seg)) (y-point (end-seg seg))) 2)))
;(define y (cons y y))
